/**
 * 图表默认配置设置
 */

//图表默认基本配置
export const DEFAULT_BASIC_CONFIG = {
  settings: {},
  extend: {
    backgroundColor: 'rgba(255,255,255,1)',
    textStyle: {
      color: 'rgba(0,0,0,1)',
      fontSize: 12,
    },
    grid: {
      left: 40,
      top: 60,
      right: 15,
      bottom: 50,
    },
    color: [
      '#2ec7c9',
      '#b6a2de',
      '#5ab1ef',
      '#ffb980',
      '#d87a80',
      '#8d98b3',
      '#e5cf0d',
      '#97b552',
      '#95706d',
      '#dc69aa',
      '#07a2a4',
    ],
  },
};

//图表默认标题配置
export const DEFAULT_TITLE_CONFIG = {
  settings: {},
  extend: {
    title: {
      show: true,
      text: '未设置标题',
      textStyle: {
        fontSize: 18,
        color: 'rgba(51,51,51,1)',
      },
      top: 'auto',
      left: 'center',
    },
  },
};

//图表默认图例配置
export const DEFAULT_LEGEND_CONFIG = {
  settings: {},
  extend: {
    legend: {
      show: true,
      textStyle: {
        color: 'rgba(51,51,51,1)',
        fontSize: 12,
      },
      top: 'bottom',
      left: 'center',
      align: 'auto',
      orient: 'horizontal',
    },
  },
};

//图表默认纵向标签配置
export const DEFAULT_VERTICAL_LABEL_CONFIG = {
  settings: {
    label: {
      normal: {
        show: true,
        position: 'top',
        distance: 5,
        color: 'rgba(0,0,0,1)',
        fontSize: 12,
      },
    },
  },
  extend: {},
};

//图表默认横向标签配置
export const DEFAULT_HORIZENTAL_LABEL_CONFIG = {
  settings: {
    label: {
      normal: {
        show: true,
        position: 'right',
        distance: 5,
        color: 'rgba(0,0,0,1)',
        fontSize: 12,
      },
    },
  },
  extend: {},
};

//图表默认提示信息配置
export const DEFAULT_TIP_CONFIG = {
  settings: {},
  extend: {
    tooltip: {
      show: true,
      formatter: '',
    },
  },
};

//图表默认工具栏配置
export const DEFAULT_TOOLBOX_CONFIG = {
  settings: {},
  extend: {
    toolbox: {
      show: false,
      feature: {
        saveAsImage: {},
        restore: {},
        dataView: {},
      },
    },
  },
};

//图表默认X轴配置
export const DEFAULT_XAXIS_CONFIG = {
  settings: {},
  extend: {
    xAxis: [
      {
        show: true,
        position: 'bottom',
        name: '',
        nameLocation: 'middle',
        axisLabel: {
          rotate: 0,
        },
      },
    ],
  },
};

//图表默认双X轴配置
export const DEFAULT_DOUBLE_XAXIS_CONFIG = {
  settings: {
    axisSite: {},
    xAxisType: ['normal', 'normal'],
    xAxisName: ['', ''],
  },
  extend: {},
};

//图表默认Y轴配置
export const DEFAULT_YAXIS_CONFIG = {
  settings: {},
  extend: {
    yAxis: [
      {
        show: true,
        position: 'left',
        name: '',
        nameLocation: 'end',
        axisLabel: {
          rotate: 0,
        },
      },
    ],
  },
};

//图表默认双Y轴配置
export const DEFAULT_DOUBLE_YAXIS_CONFIG = {
  settings: {
    axisSite: {},
    yAxisType: ['normal', 'normal'],
    yAxisName: ['', ''],
  },
  extend: {},
};

//默认堆栈图表配置
export const DEFAULT_STACK_CHART_CONFIG = {
  settings: {
    stack: {
      stackMetrics: [],
    },
    areaStyle: {
      normal: {
        opacity: 0.7,
      },
    },
  },
  extend: {},
};

//默认混合图表配置
export const DEFAULT_MIXIN_CHART_CONFIG = {
  settings: {
    showLine: [],
  },
  extend: {},
};

//默认折线图表配置
export const DEFAULT_LINE_CONFIG = {
  settings: {
    lineStyle: {
      normal: {
        width: 2,
        type: 'solid',
        opacity: 1,
      },
    },
    series_smooth: false,
  },
  extend: {},
};

//默认柱状图配置
export const DEFAULT_BAR_CONFIG = {
  settings: {
    series_barWidth: 'auto',
    series_barGap: '30%',
    series_barCategoryGap: '20%',
    itemStyle: {
      normal: {
        barBorderRadius: 0,
        opacity: 1,
      },
    },
  },
  extend: {},
};

//默认饼图配置
export const DEFAULT_PIE_CONFIG = {
  settings: {
    series_radius: ['0%', '75%'],
    series_center: ['50%', '50%'],
    selectedMode: false,
    roseType: false,
  },
  extend: {},
};

//默认散点图配置
export const DEFAULT_SCATTER_CONFIG = {
  settings: {
    symbol: 'circle',
    symbolSizeMax: 50,
    symbolRotate: 0,
    itemStyle: {
      normal: {
        opacity: 1,
        shadowColor: 'rgba(0, 0, 0, 0.5)',
        shadowBlur: 0,
      },
    },
  },
  extend: {},
};

//默认仪表盘配置
export const DEFAULT_GAUGE_CONFIG = {
  settings: {
    series_radius: '75%',
    series_min: 0,
    series_max: 100,
    series_splitNumber: 10,
    series_startAngle: 225,
    series_endAngle: -45,
  },
  extend: {},
};

//默认表格基本配置
export const DEFAULT_TABLE_BASIC_CONFIG = {
  settings: {
    tableStyle: {
      top: 0,
      right: 0,
      bottom: 0,
      left: 0,
      backgroundColor: '#ffffff',
      borderColor: '#dfe4e7',
      borderWidth: 0,
      borderStyle: 'solid',
    },
  },
};

//默认表格标题配置
export const DEFAULT_TABLE_TITLE_CONFIG = {
  settings: {
    headerStyle: {
      show: true,
      height: 36,
      fontSize: '12px',
      backgroundColor: '#ffffff',
      color: '#666666',
      fontWeight: 'bold',
      textAlign: 'center',
      text: '未设置标题',
    },
  },
};

//默认表格列配置
export const DEFAULT_TABLE_COLUMN_CONFIG = {
  settings: {
    columnStyle: {
      height: 32,
      fontSize: '12px',
      backgroundColor: '#eceff1',
      color: '#666666',
      fontWeight: 'bold',
      textAlign: 'center',
      borderColor: '#dfe4e7',
      borderWidth: 1,
      borderStyle: 'solid',
    },
  },
};

//默认表格行配置
export const DEFAULT_TABLE_ROW_CONFIG = {
  settings: {
    rowStyle: {
      height: 32,
      fontSize: '12px',
      backgroundColor: '#ffffff',
      color: '#333333',
      fontWeight: 'normal',
      textAlign: 'center',
      horizenBorderColor: '#eceff1',
      horizenBorderWidth: 1,
      horizenBorderStyle: 'solid',
      verticalBorderColor: '#eceff1',
      verticalBorderWidth: 1,
      verticalBorderStyle: 'solid',
    },
    stripe: {
      show: true,
      color: '#f7f8f9',
    },
  },
};
